-- GENERATED SPELL FOR [Thunderhead Skystormer] --


function spell0_6378(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(6535,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6378', 18000, 1)
end

function spell1_6378(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(12553,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6378', 0, 1)
end

function Sorts_6378(pUnit, Event)
local choix_sorts_6378 = math.random(0, 1)
if choix_sorts_6378 == 0 then
pUnit:RegisterEvent('spell0_6378', 1, 1)
end
if choix_sorts_6378 == 1 then
pUnit:RegisterEvent('spell1_6378', 1, 1)
end
end

function mob6378_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6378', math.random(1500, 3000), 1)
end

function mob6378_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6378_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6378_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6378, 1, 'mob6378_Action')
RegisterUnitEvent(6378, 2, 'mob6378_Leave')
RegisterUnitEvent(6378, 3, 'mob6378_Kill')
RegisterUnitEvent(6378, 4, 'mob6378_Die')
